﻿#region

using Vin.Extension.Framework.Login.ServiceInterface;
using Vin.Tool.Attributes;
using Vin.Tool.Core.EncryptCategory;

#endregion

namespace Vin.Extension.Framework.Login.Service.SysPasswordService;

[Service]
public class SysMd5PasswordService : ISysPasswordService
{
    public string Encrypt(string password)
    {
        return Md5EncryptTool.Md5EncryptByNum(password);
    }

    public bool Verify(string password, string? hash)
    {
        return Md5EncryptTool.Md5EncryptByNum(password) == hash;
    }
}